package cc.ttiot.mapper.domain;

import lombok.Data;
import lombok.NoArgsConstructor;

import static cc.ttiot.enums.TablesInfo.VibrationSensor;

/**
 * @Description: “振动” 数据存储对象（在防护门项目中为单轴振动）
 * @Author WangSuheng
 * @Date 2021/9/30 11:12
 * @Version 1.0
 */

@Data
@NoArgsConstructor
public class VibrationMsg {
    public final int sensorId = VibrationSensor.getTableId(); //传感器id: 3
    //private int id;     //存入数据库vibration_msg表的数据编号
    private double vibration;  //防护门振动数据
    private String time;//时间: yyyy-MM-dd hh-mm-ss.SSS

    public VibrationMsg(double vibration, String time) {
        this.vibration = vibration;
        this.time = time;
    }

    @Override
    public String toString() {
        return "VibrationMsg{" +
                "sensorId=" + sensorId +
                ", vibration=" + vibration +
                ", time='" + time + '\'' +
                '}';
    }
}
